package com.hao.epidemic_prevention.service;

import com.hao.epidemic_prevention.bean.Department;
import com.hao.epidemic_prevention.dao.DepartmentMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @ClassName DepartmentService
 * @Descroption
 * @Author hao
 * @Date 2021/6/19 17:39
 **/
@Service
public class DepartmentService {
    @Autowired
    private DepartmentMapper departmentMapper;

    public List<Department> getAllDepartment() {
        List<Department> list = null;
        try {
            list = departmentMapper.getAllDepartment();
        }
        catch (Exception e) {
            e.printStackTrace();
        }

        return list;
    }
}
